/** @file main.qml
@brief Qt-Complex test application for Symbian platforms

@authorname \n
@licenseversion \n
@actualversion - @dateupdate

@licensenote
*/

import QtQuick 1.0
import com.nokia.symbian 1.0
import "QtComplex" as Framework
import "BlackCat.js" as BCCS

ApplicationWindow {
    id: appWindow

    MainPage{id: mainPage}

    ToolBarLayout {
        id: commonTools
        visible: true

        ToolButton {
            flat: true
            iconSource: "toolbar-back"
            onClicked: appWindow.pageStack.depth <= 1 ? Qt.quit() : appWindow.pageStack.pop()
        }
        ToolButton {
            iconSource: "toolbar-view-menu";
             anchors.right: parent===undefined ? undefined : parent.right
             onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        }
    }

    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
            MenuItem {
                text: "About"
                onClicked: BCCS.openFile("AboutPage.qml");
            }
        }
    }

    Component.onCompleted: appWindow.pageStack.push(mainPage)
}
